<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>贷款超市</title>
		<meta name = "viewport" content = "width = device-width, initial-scale = 1.0,
			 maximum-scale = 1.0, user-scalable = 0" />
		<link rel="stylesheet" href="../css/main.css" />
		<link rel="stylesheet" href="../css/style.css" />
		
	</head>
	<body class="gray">
		<div id="marketLoan">
			<div class="banner">
				<mt-swipe :auto="4000">
				  <mt-swipe-item>
				  	<a href="http://sharedqm.daiqianma.cn/">
				  		<img src="../images/banner1.jpg">
				  	</a>
				  </mt-swipe-item>
				  <mt-swipe-item>
				  	<a href="http://sharedqm.daiqianma.cn/">
				  		<img src="../images/banner2.jpg">
				  	</a>
				  </mt-swipe-item>
				  <mt-swipe-item>
				  	<a href="http://sharedqm.daiqianma.cn/">
				  		<img src="../images/banner3.jpg">
				  	</a>
				  </mt-swipe-item>
				</mt-swipe>
			</div>
			
			<div class="product" 
				v-for="item in products" 
				:key="item.id"
				v-infinite-scroll="loadMore"
				infinite-scroll-disabled="loading"
				infinite-scroll-distance="10"
				>
				<div class="nameLogo">
					<img v-bind:src="item.url">
					<h4>{{item.title}}</h4>
					<dd v-if="item.type=='month'">借款额度：{{item.minLimit}}-{{item.maxLimit}}万</dd>
					<dd v-if="item.type=='day'">借款额度：{{item.minLimit}}-{{item.maxLimit}}元</dd>
					<dd v-if="item.type=='month'">参考月利率：{{item.rate}}%</dd>
					<dd v-if="item.type=='day'">参考日利率：{{item.rate}}%</dd>
				</div>
				<div class="applyNum">
					<dd>{{item.people}}人申请</dd>
					<dd>
						成功率：
						<img src="../images/star.png" v-for="n in item.success">
					</dd>
					<dd @click="checkDetail">查看详情</dd>
				</div>
				<div class="blog" v-if="item.isHot != ''"></div>
				<span class="contentBlog" v-if="item.isHot == '推荐'">推荐</span>
				<span class="contentBlog" v-if="item.isHot == '热门'">热门</span>
			</div>
			<!--loading-->
			<div class="product loading" style="padding:0;width:100%;">
				<mt-spinner type="fading-circle" v-show="moreLoading && !allLoaded"></mt-spinner>
				<span v-show="moreLoading && !allLoaded">&nbsp;&nbsp;&nbsp;拼命加载中...</span>
				<span v-show="allLoaded">&nbsp;&nbsp;&nbsp;已全部加载</span>
			</div>
			
		</div>
		
	</body>
	<script type="text/javascript" src="../js/rem.js" ></script>
	<script type="text/javascript" src="../js/vue.js" ></script>
	<script type="text/javascript" src="../js/axios.min.js" ></script>
	<script type="text/javascript" src="../js/mint2.2.13.js" ></script>
	<script type="text/javascript">
		new Vue({
			el:"#marketLoan",
			data:{
				moreLoading:false,
				allLoaded:false,
				products:[
					{id:"1",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
					{id:"2",type:"day",lendTime:24,url:"../images/banner3.jpg",title:"立即贷",minLimit:1000,maxLimit:10000,rate:0.05,people:12345,success:2,isHot:"热门"},
					{id:"3",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:0.5,maxLimit:50,rate:0.55,people:15345,success:5,isHot:"推荐"},
					{id:"4",type:"day",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
					{id:"5",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
					{id:"6",type:"day",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
					{id:"7",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
//					{id:"8",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
//					{id:"9",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
//					{id:"10",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
//					{id:"11",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
//					{id:"12",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
//					{id:"13",type:"month",lendTime:24,url:"../images/banner3.jpg",title:"贷钱吗",minLimit:1,maxLimit:50,rate:0.05,people:12345,success:4,isHot:""},
				]
			},
			created(){
//				axios.get("",{
//					params:{}
//				}).then(function(response){
//					console.log(response.data);
//				});
			},
			methods:{
				checkDetail(){
					window.location.href="marketDetail.html";
				},
				loadMore() {
//				  this.showLoading = true;
				  console.log("1");
//				  setTimeout(() => {
//				    let last = this.products[this.products.length - 1];
//				    for (let i = 1; i <= 10; i++) {
//				      this.products.push(last + i);
//				    }
//				    this.loading = false;
//				  }, 2500);
				}
				
			}
		})
	</script>
	
</html>
